<extend name="Public/publicHTML" />

<block name='content'>
<link rel="stylesheet" href="__COMMON__/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="__COMMON__/bootstrap/css/font-awesome.min.css" />
<div class="wrapper">
	<section class="content">
		<div class="row">
			<div class="col-xs-12">
				<div class="box">
					<div class="box-header">
						<nav class="navbar navbar-default">
							<div class="collapse navbar-collapse">
								<form class="navbar-form form-inline" action="{:U('index')}"
									method="post">
									<div class="form-group">
										<input type="text" name="{$goodsModel::$title_d}"
											class="form-control" placeholder="搜索"
											value="{$_POST[$goodsModel::$title_d]}">
									</div>
									<button type="submit" class="btn btn-default">提交</button>
									<div class="form-group pull-right">
										<a href="{:U('addHtml')}" class="btn btn-primary pull-right"><i
											class="fa fa-plus"></i>添加尾货清仓</a>
									</div>
								</form>
							</div>
						</nav>
					</div>
					<!-- /.box-header -->
					<div class="box-body">
						<div class="row">
							<div class="col-sm-12">
								<table id="list-table"
									class="table table-bordered table-striped dataTable">
									<thead>
										<tr role="row" align="center">
											<th class="sorting" tabindex="0">商品名称</th>
											<th class="sorting" tabindex="0">折扣类型</th>
											<th class="sorting" tabindex="0">开始时间</th>
											<th class="sorting" tabindex="0">结束时间</th>
											<th class="sorting" tabindex="0">优惠</th>
											<th class="sorting" tabindex="0">是否限制时购买</th>
											<th class="sorting" tabindex="0">操作</th>
										</tr>
									</thead>
									<tbody>
										<if condition="!empty($promotionData['data'])"> <foreach
											name="promotionData['data']" item="vo" key="k">
										<tr role="row" align="center">
											<td class="">{$vo[$goodsModel::$title_d]}</td>
											<td><if condition="$vo[$poopModel::$typeId_d] == -1">买就送代金卷<else />{$vo[$proType::$promationName_d]}</if></td>
											<td>{$startTime}</td>
											<td>{$endTime}</td>
											<td><if condition="!empty($vo[$couponModel::$name_d])">{$vo[$couponModel::$name_d]}<else/>{$vo[$poopModel::$expression_d]}</if></td>
											<td><if condition="!empty($vo[$poopModel::$status_d])">
												<img src="__COMMON__/img/yes.png"
													key="{$poopModel::$status_d}"
													data-status="{$vo[$poopModel::$status_d]}"
													data-id="{$vo[$poopModel::$id_d]}" /> <else /> <img
													src="__COMMON__/img/cancel.png"
													key="{$poopModel::$status_d}"
													data-status="{$vo[$poopModel::$status_d]}"
													data-id="{$vo[$poopModel::$id_d]}" /> </if></td>
											<td><a class="btn btn-primary"
												href="{:U('editHtml',array('id'=>$vo[$poopModel::$id_d], $poopModel::$goodsId_d => $vo[$poopModel::$goodsId_d]))}"><i
													class="fa fa-pencil"></i></a> 
												<a 
													class="btn btn-danger"
													onclick="Poop.deleteDataByRomente('{:U('deletePoopClear')}', this)"
												><i class="fa fa-trash-o"></i> 
													<input type="hidden" name="{$poopModel::$id_d}" value="{$vo[$poopModel::$id_d]}"/>
													<input type="hidden" name="{$poopModel::$goodsId_d}" value="{$vo[$poopModel::$goodsId_d]}"/>
												</a></td>
										</tr>
										</foreach> </if>
									</tbody>
								</table>
							</div>
						</div>
						<div class="page">
							<div class="col-sm-6 text-left"></div>
							<div class="col-sm-6 text-right">{$promotionData.page}</div>
						</div>
					</div>
					<!-- /.box-body -->
				</div>
				<!-- /.box -->
			</div>
		</div>
	</section>
</div>
<script type="text/javascript" src="__COMMON__/js/alert.js"></script> 
<script type="text/javascript"
	src="__JS__/promation/poop.js?a={:time()}"></script>
</block>